<template>
    <div class="c-item">
        <a test="{{item.id}}" v-link="{name: 'subject', params: {tid: item.id, id: cid}}">
            <h3 v-if="item.title" class="s-title ellipsis">{{item.title}}</h3>
            <img v-if="item.img" :src="item.img" alt="{{item.title}}"/>
            <span v-if="item.content" class="s-intro">{{item.content}}</span>
        </a>
    </div>
</template>

<script>

    export default {
        name: 'SubjectItem',
        props: {
            item: Object,
            index: Number
        },
        data (){
            return {
                cid: this.$route.params.id
            }
        }
    }
</script>